<?php /* Smarty version 2.6.20, created on 2016-07-26 18:37:35
         compiled from ./orders/modify.php */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('block', 'orders', './orders/modify.php', 6, false),array('block', 'shops', './orders/modify.php', 11, false),array('modifier', 'default', './orders/modify.php', 19, false),array('function', 'html_select_date', './orders/modify.php', 56, false),)), $this); ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "admin/top.php", 'smarty_include_vars' => array('subject' => 'orders')));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "orders/top.php", 'smarty_include_vars' => array('subject' => 'orders')));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>

<div id="content">
  <form method="post">
  <?php $this->_tag_stack[] = array('orders', array('limit' => 1,'id' => $this->_tpl_vars['segment']['orders_id'])); $_block_repeat=true;smarty_block_orders($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>
  	<input type="hidden" name="list_page" value="<?php echo $_GET['page']; ?>
" />
    <table width="100%" border="0" cellpadding="5" cellspacing="0" id="editor">
      <tr>
        <td width="100" class="title">仓库:</td>
        <td width="240" class="content"><select name="shopid"><?php $this->_tag_stack[] = array('shops', array()); $_block_repeat=true;smarty_block_shops($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?><option value="<?php echo $this->_tpl_vars['shops']['id']; ?>
" <?php if ($_POST): ?><?php if ($this->_tpl_vars['shops']['id'] == $_POST['shopid']): ?>selected<?php endif; ?><?php else: ?><?php if ($this->_tpl_vars['shops']['id'] == $this->_tpl_vars['orders']['shopid']): ?>selected<?php endif; ?><?php endif; ?> <?php if (1 == $this->_tpl_vars['shops']['disabled']): ?>disabled<?php endif; ?>><?php echo $this->_tpl_vars['shops']['title']; ?>
</option><?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_shops($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); }  array_pop($this->_tag_stack); ?></select> *</td>
        <td width="804" class="content">
        <?php if ($this->_tpl_vars['errors']['empty_shopid']): ?><span class="warning">请选择仓库</span>
        <?php else: ?>&nbsp;<?php endif; ?>
        </td>
      </tr>
      <tr>
        <td class="title">产品名称:</td>
        <td class="content"><input name="product" type="text" id="product" value="<?php echo ((is_array($_tmp=@$_POST['product'])) ? $this->_run_mod_handler('default', true, $_tmp, @$this->_tpl_vars['orders']['product'], 1) : smarty_modifier_default($_tmp, @$this->_tpl_vars['orders']['product'], 1)); ?>
" autocomplete="off" size="30" onclick="select()"
        onkeyup="context_menu_products(this, 'productid=[product_sku_id],product=[title],spec=[spec],unit=[unit],pricebuy=[pricebuy]')"
        onfocus="context_menu_products(this, 'productid=[product_sku_id],product=[title],spec=[spec],unit=[unit],pricebuy=[pricebuy]')" />
        *</td>
        <td class="content">
        <?php if ($this->_tpl_vars['errors']['empty_product']): ?><span class="warning">产品名称不能为空</span>
        <?php elseif ($this->_tpl_vars['errors']['unexist_product']): ?><span class="warning">产品数据中找不到该产品</span>
        <?php else: ?>在此输入/选择产品编号后产品信息会自动填写
        <?php endif; ?>
        </td>
      </tr>
      <tr style="display:none;">
        <td class="title">产品编号:</td>
        <td class="content"><input name="productid" type="text" id="productid" value="<?php echo ((is_array($_tmp=@$_POST['productid'])) ? $this->_run_mod_handler('default', true, $_tmp, @$this->_tpl_vars['orders']['productid']) : smarty_modifier_default($_tmp, @$this->_tpl_vars['orders']['productid'])); ?>
" size="30" readonly="readonly" /></td>
        <td class="content">&nbsp;</td>
      </tr>
      <tr>
        <td class="title">产品规格:</td>
        <td class="content"><input name="spec" type="text" id="spec" value="<?php echo ((is_array($_tmp=@$_POST['spec'])) ? $this->_run_mod_handler('default', true, $_tmp, @$this->_tpl_vars['orders']['spec']) : smarty_modifier_default($_tmp, @$this->_tpl_vars['orders']['spec'])); ?>
" size="30" readonly="readonly"/></td>
        <td class="content">&nbsp;</td>
      </tr>
      <tr>
        <td class="title">产品单位:</td>
        <td class="content"><input name="unit" type="text" id="unit" value="<?php echo ((is_array($_tmp=@$_POST['unit'])) ? $this->_run_mod_handler('default', true, $_tmp, @$this->_tpl_vars['orders']['unit']) : smarty_modifier_default($_tmp, @$this->_tpl_vars['orders']['unit'])); ?>
" size="30" readonly="readonly"/></td>
        <td class="content">&nbsp;</td>
      </tr>
            <tr>
        <td class="title">出库数量:</td>
        <td class="content"><input name="number" type="text" id="number" value="<?php echo ((is_array($_tmp=@$_POST['number'])) ? $this->_run_mod_handler('default', true, $_tmp, @$this->_tpl_vars['orders']['number']+0) : smarty_modifier_default($_tmp, @$this->_tpl_vars['orders']['number']+0)); ?>
" onchange="$('#pricetotal').val($('#pricebuy').val()*$('#number').val())" size="30" />
        *</td>
        <td class="content">
        <?php if ($this->_tpl_vars['errors']['empty_number']): ?><span class="warning">出库数量不能为空</span>
        <?php else: ?>&nbsp;<?php endif; ?>
        </td>
      </tr>
      <tr>
        <td class="title">出库时间:</td>
        <td class="content"><?php echo smarty_function_html_select_date(array('field_order' => 'YMD','month_format' => "%m",'time' => ((is_array($_tmp=@$this->_tpl_vars['thedate'])) ? $this->_run_mod_handler('default', true, $_tmp, @$this->_tpl_vars['orders']['thedate']) : smarty_modifier_default($_tmp, @$this->_tpl_vars['orders']['thedate']))), $this);?>
</td>
        <td class="content">&nbsp;</td>
      </tr>
      <tr class="noline">
        <td class="title">备注说明:</td>
        <td colspan="2" class="content"><textarea name="memo" cols="80" rows="5"  id="memo"><?php echo ((is_array($_tmp=@$_POST['memo'])) ? $this->_run_mod_handler('default', true, $_tmp, @$this->_tpl_vars['orders']['memo']) : smarty_modifier_default($_tmp, @$this->_tpl_vars['orders']['memo'])); ?>
</textarea> </td>
      </tr>
    </table>
    
    <div class="fr mt10">
    <input type="submit" value="确定" class="btn" />
    <a href="#this" class="btn" onclick="location.href='<?php echo $this->_tpl_vars['site_admin']; ?>
m=inventory&s=orders.php'">取消</a> 
    <input name="id" type="hidden" id="id" value="<?php echo $this->_tpl_vars['orders']['id']; ?>
" />
    <input name="referer" type="hidden" id="referer" value="<?php echo ((is_array($_tmp=@$_POST['referer'])) ? $this->_run_mod_handler('default', true, $_tmp, @$_SERVER['HTTP_REFERER'], 1) : smarty_modifier_default($_tmp, @$_SERVER['HTTP_REFERER'], 1)); ?>
" />
    <input name="action" type="hidden" id="action" value="modify" />
    </div>
	<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_orders($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); }  array_pop($this->_tag_stack); ?>
  </form>
</div>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "admin/bottom.php", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
</body>
</html>